// 图片分享  相关 api
import axios from '../untils/request'

// 图片分类
export const getImgCategory = () => {
    return axios({
        url: '/api/getimgcategory'
    })
}

// 图片列表数据
export const getImgList = (params) => {
    return axios({
        url: `/api/getimages/${params.cateid}`,
    })
}


//图片详情
export const getImgInfo = (params) => {
    return axios({
        url: `/api/getimageInfo/${params.imgid}`
    })
}


//图片略缩图
export const getThumImages = (params) => {
    return axios({
        url: `/api/getthumimages/${params.imgid}`
    })
}


//获取评论信息
export const getComments = (params) => {
    return axios({
        url: `/api/getcomments/${params.artid}`,
        params
    })
}


// 提交评论
export const publishComment = (data) => {
    return axios({
        method: 'post',
        url: `/api/postcomment/${data.artid}`,
        data: `content=${data.content}`
    })
}